package com.bcbim.model_server_interface.file.service;

import com.bcbim.model_server_interface.component.bo.ComponentTreeBO;
import com.bcbim.model_server_interface.file.dao.FileDAO;
import com.bcbim.model_server_interface.file.dto.FileListDTO;
import com.bcbim.model_server_interface.file.vo.FileInfoVO;
import com.bcbim.model_server_interface.file.vo.FileModelInfoVO;

import java.io.FileNotFoundException;
import java.util.List;

/**
 * @Description: 模型文件接口
 * @Author: ye
 * @Date: 2022/3/24
 * @Version: V1.0
 **/
public interface FileService {

    /**
     * @Description: 保存文件信息
     * @Param: FileDAO
     * @Return: int
     * @Author: ye
     * @Date: 2022/4/11
     */
    int insertFile(FileDAO fileDO);

    /**
     * @Description: 后台解析
     * @Param:
     * @Return:
     * @Author: ye
     * @Date: 2022/4/11
     */
    void parsingFile(String revitFilePath, String fileName, FileDAO fileDAO, String appKey, long fileSize) throws FileNotFoundException;

    /**
     * @Description: 根据id查询文件信息
     * @Param: fileId
     * @Return: FileInfoVO
     * @Author: ye
     * @Date: 2022/4/14
     */
    FileModelInfoVO getFileModelById(String fileId);

    /**
     * @Description: 查询文件信息
     * @Param: List<String>
     * @Return: List<FileInfoVO>
     * @Author: ye
     * @Date: 2022/5/6
     * @param fileIds
     */
    List<FileInfoVO> getFileInfo(String[] fileIds);

    /**
     * @Description: 查询构件树文件根节点
     * @Param: id
     * @Return: ComponentTreeBO
     * @Author: ye
     * @Date: 2022/5/11
     */
    ComponentTreeBO getFileRoot(String id);

    /**
     * @Description: 文件列表数量
     * @Param:
     * @Return: int
     * @Author: ye
     * @Date: 2022/3/25
     */
    int countFile(FileListDTO query);

    /**
     * @Description: 文件列表
     * @Param: FileListDTO
     * @Return: List<FileInfoVO>
     * @Author: ye
     * @Date: 2022/3/25
     */
    List<FileInfoVO> listFile(FileListDTO query);

    /**
     * @Description: 删除文件
     * @Param:
     * @Return: int
     * @Author: ye
     * @Date: 2022/3/25
     */
    int removeFile(String fileId);
}